Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(attachments): Convert FileList to array for FireFox #5656

Merged
merged 1 commit into from
Jan 2, 2024

Conversation

ChristophWurst
Copy link
Member

Firefox does not have FileList.forEach.

Fixes #5655

Additionally, I've added try-catch with an error toast for when upload still fails.

How to test

  1. Start Firefox
  2. Create an event
  3. Open the sidebar
  4. Upload a local attachment

Firefox does not have FileList.forEach

Signed-off-by: Christoph Wurst <[email protected]>
@ChristophWurst ChristophWurst added 3. to review Waiting for reviews bug labels Jan 2, 2024
@ChristophWurst ChristophWurst self-assigned this Jan 2, 2024
@ChristophWurst
Copy link
Member Author

/backport to stable4.6

@backportbot-nextcloud backportbot-nextcloud bot added the backport-request A backport was requested for this pull request label Jan 2, 2024
Copy link

codecov bot commented Jan 2, 2024

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (f45fc62) 24.45% compared to head (d8ed0ff) 24.44%.
Report is 11 commits behind head on main.

Files Patch % Lines
.../components/Editor/Attachments/AttachmentsList.vue 0.00% 2 Missing ⚠️
src/services/attachmentService.js 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #5656      +/-   ##
============================================
- Coverage     24.45%   24.44%   -0.01%     
  Complexity      418      418              
============================================
  Files           243      243              
  Lines         10833    10835       +2     
  Branches       1776     1776              
============================================
  Hits           2649     2649              
- Misses         8184     8186       +2     
Flag Coverage Δ
javascript 15.50% <0.00%> (-0.01%) ⬇️
php 61.63% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@st3iny st3iny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and wörks.

@ChristophWurst ChristophWurst merged commit 5850583 into main Jan 2, 2024
35 of 37 checks passed
@ChristophWurst ChristophWurst deleted the fix/attachments/upload-local-file-firefox branch January 2, 2024 16:06
@backportbot-nextcloud backportbot-nextcloud bot removed the backport-request A backport was requested for this pull request label Jan 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

files.forEach is not a function when attaching local files to events
2 participants